package org.example.codeservce.enumStatus;

/**
 * author: Li Qing
 * date: 2024/5/17 11:22
 * description:
 */
public enum WebSocketServiceType
{
    OrderWebSocketServiceImpl("OrderWebSocketServiceImpl", 1, "订单状态获取"),
    ;

    WebSocketServiceType(String beanName, Integer type, String desc)
    {
        this.beanName = beanName;
        this.type = type;
        this.desc = desc;
    }

    private String beanName;
    private Integer type;

    private String desc;

    public String getBeanName()
    {
        return beanName;
    }

    public Integer getType()
    {
        return type;
    }

    public String getDesc()
    {
        return desc;
    }

    public static String findBeanName(Integer type)
    {
        WebSocketServiceType[] values = WebSocketServiceType.values();
        for (WebSocketServiceType value : values)
        {
            if (value.type.equals(type))
            {
                return value.beanName;
            }
        }
        return null;
    }
}
